package problem;

import main.Main;
import env.Move;

public class logic {
	public static int calcCost(Move move) {
		if (move == null) // no-op
			return Main.noOpCost;
		int ans = move.road.getCost();
		// cost multipliers
		if (move.chems)
			ans *= 2;
		if (move.escort)
			ans *= 2;

		if (!move.road.isBlocked())
			return ans; // unblocked, we are good
		else {
			if (move.escort)
				return ans; // blocked yet escorted, we are good
			else
				return Main.hellBreakLooseCost; // we die, return negative
		}
	}
}
